package cn.tedu.inter;
/**本类用于面向接口编程*/
public class TestTeacherInter {
    public static void main(String[] args) {
        CGBTeacher ct = new CGBTeacher();
        ct.ready();
        ct.teach();
//        SCDTeacher1 sd = new SCDTeacher1();
//        sd.teach();
//        sd.ready();
    }
}
//1.创建老师接口
interface Teacher{
    void teach();
    void ready();
}
class CGBTeacher implements Teacher{
    @Override
    public void teach() {
        System.out.println("授课");
    }

    @Override
    public void ready() {
        System.out.println("备课");
    }
}
abstract class SCDTeacher implements Teacher{

    @Override
    public void ready() {
        System.out.println("正在研发新课程...");
    }
}
//class SCDTeacher1 extends SCDTeacher implements Teacher{
//
//    @Override
//    public void teach() {
//        System.out.println("头发掉光光");
//    }
//}